A publish-subscribe messaging system is a data distribution system that connects a set of publishers to a set of subscribers. Senders of messages, called publishers, have no knowledge of specific receivers, called subscribers, which consume their messages. The messages of publishers are categorized into classes (topics) and subscribers receive the messages in the classes that they are interested in without knowledge of who the publishers are. In the publish-subscribe model, subscribers typically receive only a subset of the total messages published. The process of selecting messages for reception and processing is called filtering. There are two common forms of filtering: topic-based and content-based. In a topic-based system, messages are published to “topics” or named logical channels. Subscribers in a topic-based system will receive all messages published to the topics to which they subscribe, and all subscribers to a topic will receive the same messages. The publisher is responsible for defining the classes of messages to which subscribers can subscribe. In a content-based system, messages are only delivered to a subscriber if the attributes or content of those messages match constraints defined by the subscriber. The subscriber is responsible for classifying the messages in a content-based system.
Subscribers to a publish-subscribe messaging system may be classified into durable and non-durable subscribers. A durable subscriber is a message consumer that receives all messages published on a topic, including those published while the subscriber is not connected. The messaging server, often called a broker, maintains a record of the durable subscription and ensures that all messages published on the topic are retained until they are acknowledged by the durable subscriber or they expire. A non-durable subscriber is a message consumer that only receives messages that are published while the subscriber is connected. Messages delivered while the non-durable subscriber is not connected are lost.
Topics are typically organized into a tree data structure (root at the top and leaves at the bottom) in which a given topic is represented by a node and may be a subtopic of another topic that is higher in a tree. Access to topics in a tree of topics is controlled by administration nodes in the tree that control access to the topic nodes below them. An administration node includes an authentication function that determines whether a specific user has an authority to access the messages in and/or publish to a topic node that is below the administration node in a tree, i.e., farther from the root of the tree than the administration node. Security is a major issue associated with publish-subscribe systems. Efficient ways to authenticate messages posted by publishers, i.e., prove that a publisher of a message is the publisher that is claimed, and the securing of selected messages by means of encryption are active areas of research.